{% load media %}{% load controls %}
{% extends "admin_content.html" %}

{% block content-selected %}{% endblock %}
{% block users-selected %}class="selected"{% endblock %}
{% block filebrowser-selected %}{% endblock %}

{% block subheader %}
	<h1>amministrazione utenti</h1>
{% endblock %}

{% block content %}
<div class="fieldset">
    <div id="users_table">
        <h1>Seleziona utente da modificare</h1>
        <table>
            <thead>
                <tr>
                	<th>#</th>
                    <th>Nome utente</th>
                    <th>Nome</th>
                    <th>Cognome</th>
                    <th>Indirizzo e-mail</th>
                    <th>Attivo</th>
                    <th>Privilegi di Staff</th>
                    <th>Privilegi di Superutente</th>
		    <th>Billing</th>
                </tr>
            </thead>
            {% for u in us %}
                <tr>
                	<td>{{forloop.counter}}</td>
                    <td><a href="/admin/users/{{u.username}}">{{u.username}}</a></td>
                    <td>{{u.first_name}}</td>
                    <td>{{u.last_name}}</td>
                    <td>{{u.email}}</td>
                    <td>{{u.is_active|booleanIcon}}</td>
                    <td>{{u.is_staff|booleanIcon}}</td>
                    <td>{{u.is_superuser|booleanIcon}}</td>
		    		<td><a href="/admin/users/{{u.username}}/paymethod/">paydetails</a></td>
                </tr>
            {% endfor %}
        </table>
        <div id="add_user_button"><a href="/admin/users/add">Aggiungi Utente</a></div>
    </div>
</div>
{% endblock %}
